<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1">
    <meta name="author" content="王超凡">
    <script src="./jquery.js"></script>
    <title></title>
    <style>
        * {
            box-sizing: border-box;
        }
        body {
            margin: 0;
        } 
        h1{
            margin: 0;
            background-color: #888;
            text-align: center;
            line-height: 40px;
            font-size: 20px;
        }

        .a {
            position: relative;
            width: 200px;
            height: 570px;
            border: 1px solid #666;
            margin: 100px auto;
        }
        
        
        .tupian1,
        .tupian2,
        .tupian3 {
            width: 180px;
            height: 170px;
            padding-top: 20px;
            display: flex;
            position: relative;
            overflow: hidden;
            margin: 0 auto;
        }
        
        .tupian1-1 {
            
            width: 180px;
            height: 150px;
        }
        
        .top {
            width: 180px;
            height: 20px;
            margin-top: -25px;
            background-color: red;
            position: absolute;
            left: 5px;
        }
        
        .bottom {
            width: 180px;
            height: 20px;
            background-color: green;
            position: absolute;
            left: 5px;

        }
        .cover{
            width: 400px;
            position: absolute;
        }
        .zi{
            width: 180px;
            height: 40px;
            position: absolute;
            margin-top: 155px;
        }
        img{
            padding: 0 5px;
        }
    </style>
</head>

<body>
    <div class="a">
       
            <h1>专辑推荐</h1>
        
        <div class="tupian">

            <div class="tupian1">
                <div class="cover">
                  <img src="./img/1_1.jpg" alt="">
                  <img src="./img/1_2.jpg" alt=""> 
                </div>
                <div class="zi">
                    <div class="top">COCOON/可可尼</div>
                    <div class="bottom">几何为网-极致绚烂</div>
                </div>
                
            </div>
            <div class="tupian1">
                <div class="cover">
                  <img src="./img/2_1.jpg" alt="">
                  <img src="./img/2_2.jpg" alt=""> 
                </div>
                <div class="zi">
                    <div class="top">INSUN/恩裳</div>
                    <div class="bottom">1998春印象</div>
                </div>
            </div>
            <div class="tupian1">
                <div class="cover">
                  <img src="./img/3_1.jpg" alt="">
                  <img src="./img/3_2.jpg" alt=""> 
                </div>
                <div class="zi">
                    <div class="top">JNBY/江南布衣</div>
                    <div class="bottom">NANMENG/男梦</div>
                </div>
            </div>

            

        </div>
    </div>

</body>

</html>
<script>
     $('.tupian1').hover(function(){
         $(this).find('.cover').stop().animate({
             left:-195
         },500)
     },function(){
          $('.cover').stop().animate({
             left:0
         },500)
     })
     
     $('.tupian1').hover(function(){
         $(this).find('.top').stop().animate({
             top:20
         },500)
         $(this).find('.bottom').stop().animate({
             top:-25
         },500)
     },function(){
         $('.top').stop().animate({
             top:0
         },500)
         $(this).find('.bottom').stop().animate({
             top:0
         },500)
     })
</script>